package com.kuangstudy.io.demo;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

/**
 * ClassName: Demo10
 * date: 2021/07/16 13:46:50
 *FileOutputStream(File,append) append为true开启追加写
 * \n换行
 * @author zlk
 */
public class Demo10 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("e:\\2.txt",true);
        for (int i = 0; i < 10; i++) {
            fos.write("kk好帅\n".getBytes());
        }
        fos.close();
    }
}
